package com.itheima.dao;


import com.github.pagehelper.Page;
import com.itheima.pojo.Order;
import org.apache.ibatis.annotations.Param;
import org.springframework.security.core.parameters.P;

import java.util.Date;
import java.util.List;
import java.util.Map;

public interface OrderDao {
    //根据条件查询预约信息
    Order findByCondition(Order order);

    void add(Order order);

    Map findById(String id);

    //本日预约数
    Integer findOrderCountByDate(String reportDate);

    //本月预约数
    Integer findOrderCountAfterDate(String firstDay4ThisMonth);

    //本日到诊数
    Integer findVisitsCountByDate(String reportDate);

    //本周(本月)到诊数
    Integer findVisitsAfterDate(String thisWeekMonday);

    //热门套餐
    List<Map> findHotSetmeal();

    Page<Map> findPage(Map map);

    public Integer findCountByDate(String date);

    public List<Map<String, Object>> findCountByDuring(@Param("date1") String date1, @Param("date2") String date2);

    /**
     * 通过会员id查询
     * @param memberId
     * @return
     */
    Map findByMemberId(String memberId);

    void editMemberInfoByOrderId(@Param("orderId") String orderId, @Param("telephone")String telephone,@Param("memberName") String memberName);
    //根据预约ID修改预约日期,套餐ID
    void editSetmealIdBOrderId(@Param("orderId") String orderId, @Param("setmealId") String setmealId, @Param("order_date") Date order_date);

    //根据预约ID查找预约信息
    Order findOrderById(String orderId);

    void editOrderStatus(@Param("orderId") Integer orderId, @Param("orderStatus") String orderStatus);
}
